package data;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2009-6-8
 * Time: 15:17:40
 * To change this template use File | Settings | File Templates.
 */
public class ErrorData implements FData{
    private static final int DATA_TYPE = FData.DATA_ERROR;
    private byte[] data;
    public int getPackLeng() {
        if(data == null) return 0;
        else return data.length;
    }

    public byte[] toBinaryData() {
        return data;
    }

    public int getDataType() {
        return DATA_TYPE;
    }

    public void cleanData() {
        this.data = new byte[4];
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }
}
